import React, { Component } from 'react';
import { 
	StyleSheet, 
	Text, 
	View,
	Alert,
	Button,
	TouchableOpacity
} from 'react-native';

const styles=StyleSheet.create({
	Text:{
		color:'red',
		fontSize:30
	}
})

export default class Xian extends Component{
  	//在网页Debugger  模式下 路由跳转会很慢
  	_Login=()=>{
  		this.props.navigation.navigate('Login')
  	}
  	_Register=()=>{
  		this.props.navigation.navigate('Register')
  	}
	render(){
		
		return (
			<View>
				<Text>仙剑页面</Text>
    			<Button 
    			 	style={styles.Text}
    				title='获取当前位置'
    				onPress={this.Position.bind(this)}
    				disabled={false}
    			>
    			</Button>
    			<Button
        			title="登录"
        			color="#841584"
        			onPress={this._Login}
    			>
     			</Button>
     			
     			<Button
        			title="注册"
        			color="blue"
        			onPress={this._Register}
    			>
     			</Button>
			</View>
		)
	}
	Position(){
		Alert.alert('城市','大连',[{text:'确认'}]);
		console.log('1');
	}
//	componentDidMount(){
//         //Alert.alert('1')
//  }
}
